package com.glsc.ngateway.common.api.flowable.dto.demand;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import java.time.LocalDateTime;

/**
 * @author lixing
 * 需求要素信息，对应网关后台业务要素表
 */
@ToString
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class FlowableDemandDto {

    @ApiModelProperty(value = "流程引擎实例id")
    private String processInstanceId;


    /********************************需求提交要素*****************************/

    @ApiModelProperty(value = "需求提出部门")
    private String department;

    @ApiModelProperty(value = "需求系统名称")
    private String systemId;

    @ApiModelProperty(value = "需求提出人 userid")
    private String staff;

    @ApiModelProperty(value = "原始需求人")
    private String originalStaff;
    @ApiModelProperty(value = "原始需求人中文")
    private String originalStaffName;

    @ApiModelProperty(value = "需求类型 需求类别0业务系统功能1业务报表2业务数据处理3内部系统功能4内部报表")
    private String demandType;

    @ApiModelProperty(value = "需求紧急级别 0一般1紧急2top")
    private String demandEmergeLevel;

    @ApiModelProperty(value = "需求描述")
    private String demandDetail;

    @ApiModelProperty(value = "需求文档")
    private String demandDocument;

    @ApiModelProperty(value = "需求关联页面")
    private String demandUrl;


    /****************************************需求设计审核要素*****************************/

    @ApiModelProperty(value = "方案简述")
    private String solutionGeneral;

    @ApiModelProperty(value = "技术文档")
    private String solutionDocument;


    /****************************************排期要素*****************************/
    @ApiModelProperty(value = "排期要素 json，存放List<<开发人员1，任务描述，预计上线时间>>")
    private String arrangeinfo;


    /****************************************上线要素*****************************/
    @ApiModelProperty(value = "上线要素 json，存放List<<开始开发时间，结束开发时间，实际上线时间，验证url>>")
    private String onlineinfo;


    /****************************************时间要素*****************************/
    @ApiModelProperty(value = "需求创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "操作时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    protected LocalDateTime opTime;

    @ApiModelProperty(value = "oa流程")
    private String requestId;

    @ApiModelProperty(value = "oapdf")
    private String oaPdfFile;

    @ApiModelProperty(value = "demandLevel")
    private String demandLevel;

}
